package club.caihappy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by 百岁 on 2021/9/9
 **/
@Controller
public class RestfulController {

    @RequestMapping("/add/{a}/{b}")
    public String test(@PathVariable int a, @PathVariable int b, Model model){

        int res=a+b;
        model.addAttribute("msg","和为:"+res);

        return "hello";
    }

}
